package me.yushuai.wukong.base.convertor;

import me.yushuai.wukong.base.api.dto.CreateWorkingAreaDTO;
import me.yushuai.wukong.base.api.dto.UpdateWorkingAreaDTO;
import me.yushuai.wukong.base.api.dto.WorkingAreaDTO;
import me.yushuai.wukong.base.entity.WorkingArea;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * @author zhoushuai@189.cn
 * @since 2023-03-28
 */
@Mapper(componentModel = "spring")
public interface WorkingAreaConvertor {

    WorkingAreaDTO mapToWorkingAreaDTO(WorkingArea workingArea);

    List<WorkingAreaDTO> mapToWorkingAreaDTOList(List<WorkingArea> workingAreas);

    WorkingArea mapToWorkingArea(CreateWorkingAreaDTO dto);

    void updateToWorkingArea(UpdateWorkingAreaDTO dto, @MappingTarget WorkingArea workingArea);
}
